package com.htdata.iiot.api.tsdb.config;

import com.htiiot.common.config.imp.ConfigClient;

/**
 * @author sunmya
 */
public class Configs {

    public static class TSDBConfig {
        public static String CONFIG_SECTION = "tsdb";
        public static String CLIENT_CONFIG_SECTION = "async_client";
        public static boolean WITH_METRIC = "true".equals(ConfigClient.instance().get("resources","with_metric"))?true:false;

        public static short TIMESTAMP_BYTES = 4;
        public static int SALT_BUCKETS = Integer.parseInt(ConfigClient.instance().get("tsdb","tsd.storage.salt.buckets","256"));
        public static int SALT_WIDTH = Integer.parseInt(ConfigClient.instance().get("tsdb","tsd.storage.salt.width","1"));
        public static int METRIC_WIDTH = Integer.parseInt(ConfigClient.instance().get("tsdb","tsd.storage.uid.width.metric","6"));
        public static int TAGK = Integer.parseInt(ConfigClient.instance().get("tsdb","tsd.storage.uid.width.tagk","3"));
        public static int TAGV = Integer.parseInt(ConfigClient.instance().get("tsdb","tsd.storage.uid.width.tagv","3"));
        public static String DATA_TABLE = ConfigClient.instance().get("tsdb","tsd.storage.hbase.data_table","tsdb");
        public static String UID_TABLE = ConfigClient.instance().get("tsdb","tsd.storage.hbase.uid_table","tsdb-uid");
    }
    public static class DstatusTSDBConfig{
        public static String CONFIG_SECTION = "dstatus-tsdb";
    }

}